<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:a="http://richfaces.org/a4j"
                template="/admin/template.xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />   

 <ui:define name="topnav">
            <ui:include src="/admin/menu.xhtml">
                <ui:param name="page" value="home" />
            </ui:include>
</ui:define>  
                   
<ui:define name="body">

    <rich:panel>
        <f:facet name="header" >更新现有属性</f:facet>
   
        <h:form id="atrribute" enctype="multipart/form-data">
            <div class="formRow">
            	<h:outputLabel >现有商品属性</h:outputLabel> 					
				<h:selectOneMenu id="attribute" value="#{addAttribute.currentAttribute}">
					<s:selectItems value="#{attributes}" var="attribute"
						label="#{attribute.name}" />
				   <s:convertEntity/>			
				</h:selectOneMenu>
				
			</div>
			
			<div class="formRow">
              	<h:outputLabel>属性值<em>*</em></h:outputLabel> 					
				<h:inputText id="value" value="#{newValue.valueName}" required="true" />						
            </div>
			<div class="formRow">
              	<h:outputLabel>sql语句<em>*</em></h:outputLabel> 					
				<h:inputText id="sql" value="#{newValue.sqlStr}" required="true" />						
            </div>
            <br/>
            <h:commandButton id="mergeAttribute" value="更新属性" 
                             action="#{addAttribute.mergeAttribute}"/>     			  
            <s:button id="addAttribute" value="添加新属性" 
                             action="#{addAttribute.addNewAttribute}"/> 
        </h:form>
        
    </rich:panel>

</ui:define>

</ui:composition>

